<?php
/**
 *
 * The dig index controller serves as the hub for the application's back end.
 *
 * @package    	Digitalus\Core
 * @category 	Controllers
 * @copyright  	Copyright (c) 2009,  Digitalus Media USA (http://digitalusmedia.net)
 * @license    	New BSD License, library/Dig/License.txt
 * @version 	2.0
 *
 */
class Dig_IndexController extends Zend_Controller_Action {

    /**
     * The index action loads the default admin interface tab and forwards the request to the page.
     *
     * This enables you to set the admin dashboard index page to whatever page is appropriate
     * for your application.
     *
     * You set the default page when you register the admin tabs by setting the default flag to true:
     *
     * @example item.wikiPage.default = true
     * 
     */
    public function indexAction() {
        Dig_Service_Firebug::profile('routing dig index to default dashboard page');
        $default =  DigNavigation_Service_Tab::getDefault();
        $defaultUri = $default['uri'];
        $request = DigNavigation_Service_Url::parse($defaultUri)->request;
        $this->_forward(
                $request->getActionName(),
                $request->getControllerName(),
                $request->getModuleName(),
                $request->getParams());
    }
}
?>